package com.dkd.common.exception;

/**
 * 基础异常
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 所属模块
     */
    private String module;

    /**
     * 错误消息
     */
    private String message;

    /**
     * 错误消息
     */
    private Throwable cause;

    public BaseException(String module, String message) {
        this.module = module;
        this.message = message;
    }

    public BaseException(String module, String message, Throwable cause) {
        this.module = module;
        this.message = message;
        this.cause = cause;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public String getModule() {
        return module;
    }

    @Override
    public Throwable getCause() {
        return cause;
    }
} 